import json

infile = open('runlog.log')
rawdata = infile.readlines()

ofile = open('out.txt','w')
for x in rawdata:
    x = x[29:-1]
    print(x)
    dx = json.loads(x)
    print(dx['result'][1:   ])
    result = json.loads(dx['result'][1:])
    wstr = '%s,%f,%f,%d\n' % (
        dx['file_name'][24:],
        result['ex_area'],
        result['ha_area'],
        result['ma']
        )
    print(wstr)
    ofile.write(wstr)